package top.moxingwang.javawork.bytecode;

public class StaticDispatch {
    static abstract class Human{
    }

    static class Man extends Human{

    }
    static class Woman extends Human{

    }

    public static void sayHello(Human human) {
        System.out.println("human");
    }
    public static void sayHello(Man human) {
        System.out.println("man");
    }
    public  static void sayHello(Woman human) {
        System.out.println("woman");
    }

    public static void main(String[] args) {
        Human human = new Man();
        sayHello(human);
        sayHello((Man) human);

    }
}
